//E:\lib\JDBC Drivers\mysql-connector-java-5.1.6\mysql-connector-java-5.1.6-bin.jar

import java.sql.*;
public class MySqlDB
{
public static void main(String a[]) throws Exception
{
System.out.println("hi");
Class.forName("com.mysql.jdbc.Driver");
System.out.println("hi");
Connection con=DriverManager.getConnection("jdbc:mysql://localhost:3306/test");
System.out.println("hi");
Statement st=con.createStatement();
ResultSet rs=st.executeQuery("select * from user");
while(rs.next())
{
System.out.println(rs.getString(1));
}
}
}